<?php
session_start();

if(isset($_SESSION['name'])) {

	$text = addslashes(htmlspecialchars(strip_tags(($_POST['text'])));
	
	$fp = fopen("log.html", "a+");
	fwrite($fp, '<b>'.$_SESSION['name'].'</b>: <br />'.'&nbsp&nbsp&nbsp&nbsp&nbsp<i>'.$text.'</i><br /><hr /><br />');
	fclose($fp);
}
?>